using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VGIBLG
    {
        public DataRow Convert2GIBLG(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryGIBLG(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["GIMANDANT"] = " ".PadRight(2 ); 
         dwReturn["GIJJJJ"] = " ".PadRight(4 ); 
         dwReturn["GIMM"] = " ".PadRight(2 ); 
         dwReturn["GITT"] = " ".PadRight(2 ); 
         dwReturn["GILO"] = " ".PadRight(2 ); 
         dwReturn["GILB"] = " ".PadRight(2 ); 
         dwReturn["GIINVBLG"] = " ".PadRight(4 ); 
         dwReturn["GIBLGPOS"] = " ".PadRight(3 ); 
         dwReturn["GILP"] = " ".PadRight(8 ); 
         dwReturn["GIAUFBKZ"] = " ".PadRight(1 ); 
         dwReturn["GIPARTIE"] = " ".PadRight(7 ); 
         dwReturn["GIPARTIEKZ"] = " ".PadRight(1 ); 
         dwReturn["GILBEH"] = " ".PadRight(10 ); 
         dwReturn["GILBEHI"] = " ".PadRight(10 ); 
         dwReturn["GISBSTKG"] = " ".PadRight(0 ); 
         dwReturn["GISBSTKA"] = " ".PadRight(0 ); 
         dwReturn["GISBSTSP"] = " ".PadRight(0 ); 
         dwReturn["GISBSTNET"] = " ".PadRight(0 ); 
         dwReturn["GISTARA"] = " ".PadRight(0 ); 
         dwReturn["GISHUELGEW"] = " ".PadRight(0 ); 
         dwReturn["GIIBSTKG"] = " ".PadRight(0 ); 
         dwReturn["GIIBSTKA"] = " ".PadRight(0 ); 
         dwReturn["GIIBSTSP"] = " ".PadRight(0 ); 
         dwReturn["GIIBSTNET"] = " ".PadRight(0 ); 
         dwReturn["GIITARA"] = " ".PadRight(0 ); 
         dwReturn["GIIHUELGEW"] = " ".PadRight(0 ); 
         dwReturn["GIENTDAT"] = " ".PadRight(0 ); 
         dwReturn["GIBEM"] = " ".PadRight(14 ); 
         dwReturn["GITEILNR"] = " ".PadRight(4 ); 
         dwReturn["GIABZUGKZ1"] = " ".PadRight(1 ); 
         dwReturn["GIABZUGKZ2"] = " ".PadRight(1 ); 
         dwReturn["GIABZUGKZ3"] = " ".PadRight(1 ); 
         dwReturn["GIABZUGKZ4"] = " ".PadRight(1 ); 
         dwReturn["GIHUELTYP"] = " ".PadRight(6 ); 
         dwReturn["GILAENGE"] = " ".PadRight(0 ); 
         dwReturn["GIINBEN"] = " ".PadRight(8 ); 
         dwReturn["GIINDAT"] = " ".PadRight(0 ); 
         dwReturn["GIAENDZL"] = " ".PadRight(0 ); 
         dwReturn["GIEJJJJ"] = " ".PadRight(0 ); 
         dwReturn["GIEBELEG"] = " ".PadRight(0 ); 
         dwReturn["GIELFDNR"] = " ".PadRight(0 ); 
         dwReturn["GILJJJJ"] = " ".PadRight(0 ); 
         dwReturn["GILBELEG"] = " ".PadRight(0 ); 
         dwReturn["GILLFDNR"] = " ".PadRight(0 ); 
         dwReturn["GIRUECKKZ"] = " ".PadRight(1 ); 
         dwReturn["GIART"] = " ".PadRight(20 ); 
         dwReturn["GIVAR"] = " ".PadRight(3 ); 
         dwReturn["GIFARBE"] = " ".PadRight(10 ); 
         dwReturn["GILIEFNR"] = " ".PadRight(8 ); 
         dwReturn["GIEINDAT"] = " ".PadRight(0 ); 
         dwReturn["GISPULBST"] = " ".PadRight(1 ); 
         dwReturn["GISPSTA"] = " ".PadRight(2 ); 
         dwReturn["GISPGRD"] = " ".PadRight(2 ); 
         dwReturn["GISPDAT"] = " ".PadRight(0 ); 
         dwReturn["GIPSTART"] = " ".PadRight(4 ); 
         dwReturn["GIPACKNR"] = " ".PadRight(4 ); 
         dwReturn["GIURLB"] = " ".PadRight(2 ); 
         dwReturn["GIURLP"] = " ".PadRight(8 ); 
         dwReturn["GIURAKZ"] = " ".PadRight(1 ); 
         dwReturn["GIZUSTAND"] = " ".PadRight(4 ); 
         dwReturn["GIUBDAT"] = " ".PadRight(0 ); 
         dwReturn["GIFERTKZ"] = " ".PadRight(1 ); 
         dwReturn["GIZENSUR"] = " ".PadRight(1 ); 
         dwReturn["GIZENDAT"] = " ".PadRight(0 ); 
         dwReturn["GIAUFMSL"] = " ".PadRight(2 ); 
         dwReturn["GIAUFMBEZ"] = " ".PadRight(10 ); 
         dwReturn["GISPPART"] = " ".PadRight(10 ); 
         dwReturn["GIFBPART"] = " ".PadRight(10 ); 
         dwReturn["GIZWPART"] = " ".PadRight(10 ); 
         dwReturn["GIHKGDAT"] = " ".PadRight(0 ); 
         dwReturn["GIENTKZ"] = " ".PadRight(1 ); 
         dwReturn["GIGARNBEZ"] = " ".PadRight(40 ); 
         dwReturn["GILOESCHKZ"] = " ".PadRight(1 ); 
         dwReturn["GIBEARBZ"] = " ".PadRight(2 ); 
         dwReturn["GISORTKZ"] = " ".PadRight(1 ); 
         dwReturn["GIBAUMKRS"] = " ".PadRight(2 ); 
         dwReturn["GIBAUMLFD"] = " ".PadRight(6 ); 
         dwReturn["GIFILLER"] = " ".PadRight(41 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapGIBLG(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveGIBLG(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryGIBLG(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapGIBLG(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertGIBLG(dwLocal, ITXDBVERSION);
            }
            UpdateGIBLG(dwLocal);
        }
        public void InsertGIBLG(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO GIBLG(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryGIBLG(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM GIBLG WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM GIBLG  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "GIBLG";
            Return = Result;
            return Return;
        }
        public void DeleteGIBLG(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM GIBLG   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateGIBLG(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE GIBLG SET "
                    +"GIMANDANT= :GIMANDANT,"
                    +"GIJJJJ= :GIJJJJ,"
                    +"GIMM= :GIMM,"
                    +"GITT= :GITT,"
                    +"GILO= :GILO,"
                    +"GILB= :GILB,"
                    +"GIINVBLG= :GIINVBLG,"
                    +"GIBLGPOS= :GIBLGPOS,"
                    +"GILP= :GILP,"
                    +"GIAUFBKZ= :GIAUFBKZ,"
                    +"GIPARTIE= :GIPARTIE,"
                    +"GIPARTIEKZ= :GIPARTIEKZ,"
                    +"GILBEH= :GILBEH,"
                    +"GILBEHI= :GILBEHI,"
                    +"GISBSTKG= :GISBSTKG,"
                    +"GISBSTKA= :GISBSTKA,"
                    +"GISBSTSP= :GISBSTSP,"
                    +"GISBSTNET= :GISBSTNET,"
                    +"GISTARA= :GISTARA,"
                    +"GISHUELGEW= :GISHUELGEW,"
                    +"GIIBSTKG= :GIIBSTKG,"
                    +"GIIBSTKA= :GIIBSTKA,"
                    +"GIIBSTSP= :GIIBSTSP,"
                    +"GIIBSTNET= :GIIBSTNET,"
                    +"GIITARA= :GIITARA,"
                    +"GIIHUELGEW= :GIIHUELGEW,"
                    +"GIENTDAT= :GIENTDAT,"
                    +"GIBEM= :GIBEM,"
                    +"GITEILNR= :GITEILNR,"
                    +"GIABZUGKZ1= :GIABZUGKZ1,"
                    +"GIABZUGKZ2= :GIABZUGKZ2,"
                    +"GIABZUGKZ3= :GIABZUGKZ3,"
                    +"GIABZUGKZ4= :GIABZUGKZ4,"
                    +"GIHUELTYP= :GIHUELTYP,"
                    +"GILAENGE= :GILAENGE,"
                    +"GIINBEN= :GIINBEN,"
                    +"GIINDAT= :GIINDAT,"
                    +"GIAENDZL= :GIAENDZL,"
                    +"GIEJJJJ= :GIEJJJJ,"
                    +"GIEBELEG= :GIEBELEG,"
                    +"GIELFDNR= :GIELFDNR,"
                    +"GILJJJJ= :GILJJJJ,"
                    +"GILBELEG= :GILBELEG,"
                    +"GILLFDNR= :GILLFDNR,"
                    +"GIRUECKKZ= :GIRUECKKZ,"
                    +"GIART= :GIART,"
                    +"GIVAR= :GIVAR,"
                    +"GIFARBE= :GIFARBE,"
                    +"GILIEFNR= :GILIEFNR,"
                    +"GIEINDAT= :GIEINDAT,"
                    +"GISPULBST= :GISPULBST,"
                    +"GISPSTA= :GISPSTA,"
                    +"GISPGRD= :GISPGRD,"
                    +"GISPDAT= :GISPDAT,"
                    +"GIPSTART= :GIPSTART,"
                    +"GIPACKNR= :GIPACKNR,"
                    +"GIURLB= :GIURLB,"
                    +"GIURLP= :GIURLP,"
                    +"GIURAKZ= :GIURAKZ,"
                    +"GIZUSTAND= :GIZUSTAND,"
                    +"GIUBDAT= :GIUBDAT,"
                    +"GIFERTKZ= :GIFERTKZ,"
                    +"GIZENSUR= :GIZENSUR,"
                    +"GIZENDAT= :GIZENDAT,"
                    +"GIAUFMSL= :GIAUFMSL,"
                    +"GIAUFMBEZ= :GIAUFMBEZ,"
                    +"GISPPART= :GISPPART,"
                    +"GIFBPART= :GIFBPART,"
                    +"GIZWPART= :GIZWPART,"
                    +"GIHKGDAT= :GIHKGDAT,"
                    +"GIENTKZ= :GIENTKZ,"
                    +"GIGARNBEZ= :GIGARNBEZ,"
                    +"GILOESCHKZ= :GILOESCHKZ,"
                    +"GIBEARBZ= :GIBEARBZ,"
                    +"GISORTKZ= :GISORTKZ,"
                    +"GIBAUMKRS= :GIBAUMKRS,"
                    +"GIBAUMLFD= :GIBAUMLFD,"
                    +"GIFILLER= :GIFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("GIMANDANT", OracleType.NVarChar).Value = dwData["GIMANDANT"].ToString(); 
          or1.Parameters.Add("GIJJJJ", OracleType.NVarChar).Value = dwData["GIJJJJ"].ToString(); 
          or1.Parameters.Add("GIMM", OracleType.NVarChar).Value = dwData["GIMM"].ToString(); 
          or1.Parameters.Add("GITT", OracleType.NVarChar).Value = dwData["GITT"].ToString(); 
          or1.Parameters.Add("GILO", OracleType.NVarChar).Value = dwData["GILO"].ToString(); 
          or1.Parameters.Add("GILB", OracleType.NVarChar).Value = dwData["GILB"].ToString(); 
          or1.Parameters.Add("GIINVBLG", OracleType.NVarChar).Value = dwData["GIINVBLG"].ToString(); 
          or1.Parameters.Add("GIBLGPOS", OracleType.NVarChar).Value = dwData["GIBLGPOS"].ToString(); 
          or1.Parameters.Add("GILP", OracleType.NVarChar).Value = dwData["GILP"].ToString(); 
          or1.Parameters.Add("GIAUFBKZ", OracleType.NVarChar).Value = dwData["GIAUFBKZ"].ToString(); 
          or1.Parameters.Add("GIPARTIE", OracleType.NVarChar).Value = dwData["GIPARTIE"].ToString(); 
          or1.Parameters.Add("GIPARTIEKZ", OracleType.NVarChar).Value = dwData["GIPARTIEKZ"].ToString(); 
          or1.Parameters.Add("GILBEH", OracleType.NVarChar).Value = dwData["GILBEH"].ToString(); 
          or1.Parameters.Add("GILBEHI", OracleType.NVarChar).Value = dwData["GILBEHI"].ToString(); 
          or1.Parameters.Add("GISBSTKG", OracleType.NVarChar).Value = dwData["GISBSTKG"].ToString(); 
          or1.Parameters.Add("GISBSTKA", OracleType.NVarChar).Value = dwData["GISBSTKA"].ToString(); 
          or1.Parameters.Add("GISBSTSP", OracleType.NVarChar).Value = dwData["GISBSTSP"].ToString(); 
          or1.Parameters.Add("GISBSTNET", OracleType.NVarChar).Value = dwData["GISBSTNET"].ToString(); 
          or1.Parameters.Add("GISTARA", OracleType.NVarChar).Value = dwData["GISTARA"].ToString(); 
          or1.Parameters.Add("GISHUELGEW", OracleType.NVarChar).Value = dwData["GISHUELGEW"].ToString(); 
          or1.Parameters.Add("GIIBSTKG", OracleType.NVarChar).Value = dwData["GIIBSTKG"].ToString(); 
          or1.Parameters.Add("GIIBSTKA", OracleType.NVarChar).Value = dwData["GIIBSTKA"].ToString(); 
          or1.Parameters.Add("GIIBSTSP", OracleType.NVarChar).Value = dwData["GIIBSTSP"].ToString(); 
          or1.Parameters.Add("GIIBSTNET", OracleType.NVarChar).Value = dwData["GIIBSTNET"].ToString(); 
          or1.Parameters.Add("GIITARA", OracleType.NVarChar).Value = dwData["GIITARA"].ToString(); 
          or1.Parameters.Add("GIIHUELGEW", OracleType.NVarChar).Value = dwData["GIIHUELGEW"].ToString(); 
          or1.Parameters.Add("GIENTDAT", OracleType.NVarChar).Value = dwData["GIENTDAT"].ToString(); 
          or1.Parameters.Add("GIBEM", OracleType.NVarChar).Value = dwData["GIBEM"].ToString(); 
          or1.Parameters.Add("GITEILNR", OracleType.NVarChar).Value = dwData["GITEILNR"].ToString(); 
          or1.Parameters.Add("GIABZUGKZ1", OracleType.NVarChar).Value = dwData["GIABZUGKZ1"].ToString(); 
          or1.Parameters.Add("GIABZUGKZ2", OracleType.NVarChar).Value = dwData["GIABZUGKZ2"].ToString(); 
          or1.Parameters.Add("GIABZUGKZ3", OracleType.NVarChar).Value = dwData["GIABZUGKZ3"].ToString(); 
          or1.Parameters.Add("GIABZUGKZ4", OracleType.NVarChar).Value = dwData["GIABZUGKZ4"].ToString(); 
          or1.Parameters.Add("GIHUELTYP", OracleType.NVarChar).Value = dwData["GIHUELTYP"].ToString(); 
          or1.Parameters.Add("GILAENGE", OracleType.NVarChar).Value = dwData["GILAENGE"].ToString(); 
          or1.Parameters.Add("GIINBEN", OracleType.NVarChar).Value = dwData["GIINBEN"].ToString(); 
          or1.Parameters.Add("GIINDAT", OracleType.NVarChar).Value = dwData["GIINDAT"].ToString(); 
          or1.Parameters.Add("GIAENDZL", OracleType.NVarChar).Value = dwData["GIAENDZL"].ToString(); 
          or1.Parameters.Add("GIEJJJJ", OracleType.NVarChar).Value = dwData["GIEJJJJ"].ToString(); 
          or1.Parameters.Add("GIEBELEG", OracleType.NVarChar).Value = dwData["GIEBELEG"].ToString(); 
          or1.Parameters.Add("GIELFDNR", OracleType.NVarChar).Value = dwData["GIELFDNR"].ToString(); 
          or1.Parameters.Add("GILJJJJ", OracleType.NVarChar).Value = dwData["GILJJJJ"].ToString(); 
          or1.Parameters.Add("GILBELEG", OracleType.NVarChar).Value = dwData["GILBELEG"].ToString(); 
          or1.Parameters.Add("GILLFDNR", OracleType.NVarChar).Value = dwData["GILLFDNR"].ToString(); 
          or1.Parameters.Add("GIRUECKKZ", OracleType.NVarChar).Value = dwData["GIRUECKKZ"].ToString(); 
          or1.Parameters.Add("GIART", OracleType.NVarChar).Value = dwData["GIART"].ToString(); 
          or1.Parameters.Add("GIVAR", OracleType.NVarChar).Value = dwData["GIVAR"].ToString(); 
          or1.Parameters.Add("GIFARBE", OracleType.NVarChar).Value = dwData["GIFARBE"].ToString(); 
          or1.Parameters.Add("GILIEFNR", OracleType.NVarChar).Value = dwData["GILIEFNR"].ToString(); 
          or1.Parameters.Add("GIEINDAT", OracleType.NVarChar).Value = dwData["GIEINDAT"].ToString(); 
          or1.Parameters.Add("GISPULBST", OracleType.NVarChar).Value = dwData["GISPULBST"].ToString(); 
          or1.Parameters.Add("GISPSTA", OracleType.NVarChar).Value = dwData["GISPSTA"].ToString(); 
          or1.Parameters.Add("GISPGRD", OracleType.NVarChar).Value = dwData["GISPGRD"].ToString(); 
          or1.Parameters.Add("GISPDAT", OracleType.NVarChar).Value = dwData["GISPDAT"].ToString(); 
          or1.Parameters.Add("GIPSTART", OracleType.NVarChar).Value = dwData["GIPSTART"].ToString(); 
          or1.Parameters.Add("GIPACKNR", OracleType.NVarChar).Value = dwData["GIPACKNR"].ToString(); 
          or1.Parameters.Add("GIURLB", OracleType.NVarChar).Value = dwData["GIURLB"].ToString(); 
          or1.Parameters.Add("GIURLP", OracleType.NVarChar).Value = dwData["GIURLP"].ToString(); 
          or1.Parameters.Add("GIURAKZ", OracleType.NVarChar).Value = dwData["GIURAKZ"].ToString(); 
          or1.Parameters.Add("GIZUSTAND", OracleType.NVarChar).Value = dwData["GIZUSTAND"].ToString(); 
          or1.Parameters.Add("GIUBDAT", OracleType.NVarChar).Value = dwData["GIUBDAT"].ToString(); 
          or1.Parameters.Add("GIFERTKZ", OracleType.NVarChar).Value = dwData["GIFERTKZ"].ToString(); 
          or1.Parameters.Add("GIZENSUR", OracleType.NVarChar).Value = dwData["GIZENSUR"].ToString(); 
          or1.Parameters.Add("GIZENDAT", OracleType.NVarChar).Value = dwData["GIZENDAT"].ToString(); 
          or1.Parameters.Add("GIAUFMSL", OracleType.NVarChar).Value = dwData["GIAUFMSL"].ToString(); 
          or1.Parameters.Add("GIAUFMBEZ", OracleType.NVarChar).Value = dwData["GIAUFMBEZ"].ToString(); 
          or1.Parameters.Add("GISPPART", OracleType.NVarChar).Value = dwData["GISPPART"].ToString(); 
          or1.Parameters.Add("GIFBPART", OracleType.NVarChar).Value = dwData["GIFBPART"].ToString(); 
          or1.Parameters.Add("GIZWPART", OracleType.NVarChar).Value = dwData["GIZWPART"].ToString(); 
          or1.Parameters.Add("GIHKGDAT", OracleType.NVarChar).Value = dwData["GIHKGDAT"].ToString(); 
          or1.Parameters.Add("GIENTKZ", OracleType.NVarChar).Value = dwData["GIENTKZ"].ToString(); 
          or1.Parameters.Add("GIGARNBEZ", OracleType.NVarChar).Value = dwData["GIGARNBEZ"].ToString(); 
          or1.Parameters.Add("GILOESCHKZ", OracleType.NVarChar).Value = dwData["GILOESCHKZ"].ToString(); 
          or1.Parameters.Add("GIBEARBZ", OracleType.NVarChar).Value = dwData["GIBEARBZ"].ToString(); 
          or1.Parameters.Add("GISORTKZ", OracleType.NVarChar).Value = dwData["GISORTKZ"].ToString(); 
          or1.Parameters.Add("GIBAUMKRS", OracleType.NVarChar).Value = dwData["GIBAUMKRS"].ToString(); 
          or1.Parameters.Add("GIBAUMLFD", OracleType.NVarChar).Value = dwData["GIBAUMLFD"].ToString(); 
          or1.Parameters.Add("GIFILLER", OracleType.NVarChar).Value = dwData["GIFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
